package MessageBuilder;

import java.util.Date;

public abstract class Builder {
	
	protected AutoMessage msg;
	
	public abstract void bulidSubject();
	
	public abstract void buildBody();
	
	//收件人零件的建造方法
	public void buildTo(String to) {
		msg.setTo(to);
	}
	
	public void buildFrom(String from) {
		msg.setFrom(from);
	}
	
	public void buildSendDate() {
		msg.setSendDate(new Date());
	}
	
	public void sendMessage() {
		msg.send();
	}
}
